﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sita.Entities.BusinessUnit>" %>

<%@ Import Namespace="Sita.Presentation.Resources.BusinessUnit" %>
<%@ Import Namespace="Sita.Presentation.Resources.Shared" %>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <% Html.RenderPartial("TableIncludes"); %>
    <% Html.RenderPartial("FormIncludes"); %>
    <script src="../../Scripts/Shared/jQuery/ui/i18n/jquery.ui.datePicker-es.js" type="text/javascript"></script>
    <script src="<%: Html.AuthenticateUrl("~/Scripts/BusinessUnit/Index.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.EnableClientValidation(); %>
    <% using (Ajax.BeginForm("Edit", "BusinessUnit",
           new AjaxOptions() { OnBegin = "beginSubmit", OnComplete = "submitCompleted", HttpMethod = "Post" }, new { id = "CreateForm" }))
       {%>
    <% var initialDate = "";
       if (Model.InitialDate.HasValue)
       {
           initialDate = Model.InitialDate.Value.Day + "/" + Model.InitialDate.Value.Month + "/" + Model.InitialDate.Value.Year;
       }%>
    <%: Html.ValidationSummary(true)%>
    <%: Html.HiddenFor(model=>model.BusinessUnitID)%>
    <%: Html.HiddenFor(model=>model.ParentID) %>
    <%: Html.HiddenFor(model=>model.Deleted) %>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Name)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Name, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Name, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Address)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Address, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Address, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.State)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.State, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.State, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.PostalCode)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.PostalCode, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.PostalCode, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Neighbourhood)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Neighbourhood, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Neighbourhood, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Email)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Email, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Email, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Phone)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Phone, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Phone, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.PoundPrice)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.PoundPrice, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.PoundPrice, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.DollarPrice)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.DollarPrice, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.DollarPrice, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.ImportPrice)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.ImportPrice, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.ImportPrice, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Web)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Web, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Web, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.IVAType)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.IVAType, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.IVAType, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.CUIT)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.CUIT, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.CUIT, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.Incomes)%>
        </div>
        <div class="form-modulo-box">
            <%: Html.TextBoxFor(model => model.Incomes, new { @class = "form-input" })%>
            <%: Html.ValidationImageFor(model => model.Incomes, "warning.png", null, null, true)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            <%: Html.LabelFor(model => model.InitialDate)%>
        </div>
        <div class="form-modulo-box" style="font-size: 12px">
            <input type="text" id="_initialDate" readonly="readonly" onkeydown="preventBackspace();"
                value="<%: initialDate %>" />
            <%: Html.HiddenFor(model => model.InitialDate)%>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title">
            Actualizar?
        </div>
        <div class="form-modulo-box" style="font-size: 12px">
            <%: Html.CheckBoxFor(model => model.UpdatePrice) %>
        </div>
    </div>
    <div class="form-modulo">
        <div class="form-modulo-title" />
        <div class="form-modulo-boton">
            <input type="submit" class="form-submit" value="" id="Save" />
            <input type="button" class="form-reset" value="" id="Cancel" onclick="closePopUp()" />
        </div>
    </div>
    <%} %>
    <script type="text/javascript">
        $(function () {
            ValidateForm();
        });
    </script>
</asp:Content>
